//
//  RLPerson.m
//  CodeFor链式编程
//
//  Created by relax on 2017/11/16.
//  Copyright © 2017年 relax. All rights reserved.
//

#import "RLPerson.h"

@implementation RLPerson

- (instancetype)initWithCoder:(NSCoder *)coder
{
    self = [super init];
    if (self) {
        self.name = [coder decodeObjectForKey:@"name"];
        self.age = [coder decodeIntegerForKey:@"age"];
    }
    return self;
}

- (void)encodeWithCoder:(NSCoder *)aCoder {
    [aCoder encodeObject:self.name forKey:@"name"];
    [aCoder encodeInteger:self.age forKey:@"age"];
}

@end
